import request from '@/utils/request'

export const addNews = (params) => {
  return request({
    method: 'post',
    url: '/api/news/add',
    data: params
  })
}

export const getNews = (params) => {
  return request({
    method: 'post',
    url: '/api/news/getList',
    data: params
  })
}

export const deleteNews = (params) => {
  return request({
    method: 'delete',
    url: '/api/news/delete',
    data: params
  })
}

export const editNews = (params) => {
  return request({
    method: 'put',
    url: '/api/news/edit',
    data: params
  })
}